import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  server:{
    proxy: {
      '/websocket':{
        target:"wss://chatgpt.dlsjfx.com/",
        changeOrigin:true,
        rewrite: (path) => path.replace(/^\/websocket/, '/chat/websocket'),
      },
      '/chat': {
        target: 'https://chatgpt.dlsjfx.com/',
        changeOrigin: true,
        // rewrite: (path) => path.replace(/^\/api/, ''),
      }
    },
  }
})
